package com.rollawizards.server
{
    import flash.utils.ByteArray;

    public class Player
    {
        private var proxy:Proxy;

        private var goesUp:Boolean;
        private var goesDown:Boolean;
        private var goesLeft:Boolean;
        private var goesRight:Boolean;

        private var mouseX:int;
        private var mouseY:int;

        public function Player(proxy:Proxy)
        {
            this.proxy = proxy;
            proxy.setClient(this);
        }

        public function receivePacket(packet:ByteArray):void
        {
            packet.position = 0;
            var code:int = packet.readByte();
            var up:Boolean = packet.readBoolean();
            var down:Boolean = packet.readBoolean();
            var left:Boolean = packet.readBoolean();
            var right:Boolean = packet.readBoolean();
            
            var mouse:Boolean = packet.readBoolean();
            var x:int = packet.readShort();
            var y:int = packet.readShort();
        }
    }
}
